package com.example.demo.service;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/6/15
 */
@Service
@RequestMapping("/user")
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    public List<User> getAnyUser(){
        return userMapper.getAnyUser();
    }

    public int myDel(String code){
        return userMapper.myDel(code);
    }

    public int add(User user) {
        return userMapper.add(user);
    }

    public int update(String u_loginName, String password1){
        return userMapper.update(u_loginName,password1);
    }

}
